package com.summer.shopping.domain.common.req;

public class ReqHolder {

    private static final ThreadLocal<ReqInfo> info = new ThreadLocal<>();

    public static void set(ReqInfo reqInfo) {
        info.set(reqInfo);
    }


    public static ReqInfo get() {
        return info.get();
    }

    public static Long getUserId() {
        return info.get().getUserId();
    }

    public static Integer getPermission(){return info.get().getPermission();}


}
